<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册 - 基于Hadoop的降雨量分析系统</title>
    <style>
        body, html {
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
            height: 100%;
        }
        body {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            background: linear-gradient(to bottom right, #4ade80, #3b82f6);
        }
        .content {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 2rem;
        }
        .container {
            width: 100%;
            max-width: 400px;
            background-color: white;
            border-radius: 0.5rem;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            padding: 2rem;
        }
        h1 {
            text-align: center;
            color: #1f2937;
            margin-top: 0;
            margin-bottom: 2rem;
        }
        .form-group {
            margin-bottom: 1rem;
        }
        label {
            display: block;
            margin-bottom: 0.5rem;
            color: #4b5563;
        }
        input {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid #d1d5db;
            border-radius: 0.25rem;
        }
        button {
            width: 100%;
            padding: 0.75rem;
            background-color: #3b82f6;
            color: white;
            border: none;
            border-radius: 0.25rem;
            cursor: pointer;
            font-size: 1rem;
            transition: background-color 0.3s;
        }
        button:hover {
            background-color: #2563eb;
        }
        .form-footer {
            text-align: center;
            margin-top: 1rem;
        }
        .form-footer a {
            color: #3b82f6;
            text-decoration: none;
        }
        .form-footer a:hover {
            text-decoration: underline;
        }
        footer {
            background-color: #1f2937;
            color: white;
            text-align: center;
            padding: 0.5rem 0;
            font-size: 0.875rem;
        }


    </style>
</head>
<body>
<div class="content">
    <h1>基于Hadoop的降雨量分析系统</h1>
    <div class="container">
        <h2>注册</h2>

        {% with messages = get_flashed_messages(with_categories=true) %}
        {% if messages %}
        <ul>
            {% for category, message in messages %}
            <li class="{{ category }}">{{ message }}</li>
            {% endfor %}
        </ul>
        {% endif %}
        {% endwith %}

        <form id="registerForm" action="/register" method="post">
            <div class="form-group">
                <label for="registerName">用户名</label>
                <input type="text" id="registerName" name="username" required placeholder="请输入用户名">
            </div>
            <div class="form-group">
                <label for="registerEmail">邮箱</label>
                <input type="email" id="registerEmail" name="email" required placeholder="请输入邮箱">
            </div>
            <div class="form-group">
                <label for="registerPassword">密码</label>
                <input type="password" id="registerPassword" name="password" required placeholder="请输入密码">
            </div>
            <div class="form-group">
                <label for="confirmPassword">确认密码</label>
                <input type="password" id="confirmPassword" name="confirmPassword" required placeholder="请确认密码">
            </div>

            <button type="submit">注册</button>
            <div class="form-footer">
                已有账号？ <a href="login">登录</a>
            </div>
        </form>
    </div>
</div>
<footer>
    <p>© 2024 气象降雨量分析系统</p>
</footer>
</body>
</html>